<?php

namespace Kangcg\Application\Validate\Rules;



use Kangcg\Application\Validate\Validator;

class Boolean implements RuleInterface
{
    use RuleTrait;

    protected function afterRun(&$value, string $field, array $input, Validator $validator)
    {
        if(!is_bool($value)){
            return $validator->setError($this->getMessage($field));
        }
    }
}
